﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="format-detection" content="telephone=no" />
    <title>智慧团建系统-打卡中心-签退</title>
    <link rel="icon" href="favicon.ico" mce_href="favicon.ico" type="image/x-icon">
	<link rel="shortcut icon" href="favicon.ico" mce_href="favicon.ico" type="image/x-icon">
	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=IE8" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<meta http-equiv="Expires" content="0">
	<meta http-equiv="Pragma" content="no-cache">
	<meta http-equiv="Cache" content="no-cache">
	<meta http-equiv="kiben" content="no-cache">
	<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
	<!-- css -->
    <link rel="stylesheet" type="text/css"  href="asset/css/comm.css" />
    <link type="text/css" rel="stylesheet" charset="utf-8" href="asset/bootstrap/css/bootstrap.css">
    <link type="text/css" rel="stylesheet" charset="utf-8" href="asset/css/cys.css">
    <style type="text/css">
		.ng-cloak,
		.x-ng-cloak,
		.ng-hide {
			display: none !important;
		}
		ng:form {
			display: block;
		}
		.pull-right {
			float: right !important;
			display: inline-flex;
		}
		*{font-size:14px}
		.searBOX .inpBox input.inptext, .searBOX .inpBox .selsty{width:auto}
		.searBOX{margin-left: 0;margin-bottom:16px}
		.mainBOX{padding:10px 26px}
		.newTABLE, .cooBOX{margin-left:0;font-size:14px}
		.searBOX .inpBox .left{min-width:120px}
	</style>
</head>

<body class="qm_bgcolor">
	<div id="header_wrap"></div>
    <div class="inner_line index-main">
	    <div class="mainBOX ">
	        <div id="content">
				<div>
					<div class="chartU" ng-controller="DkggCtrl as ctrl" ng-init="ctrl.query()">
						<div class="cooBOX" style="font-size:16px;color:#3dc878;font-weight:bold">
							打卡中心---课程【{{ctrl.dakacenterKeName}}】签退
							<input type="hidden" ng-model="ctrl.kcIdQueryParam">
						</div>
						<div class="searBOX">
							<div class="inpBox">
								<span class="left">学号/工号/姓名：</span>
								<input type="text" class="inptext" class="inptext" placeholder="学号/工号/姓名" ng-model="ctrl.xhghQueryParam">
							</div>
							<div class="inpBox">
								<span class="left">状态：</span>
								<select style="height:30px;padding:0 20px" ng-model="ctrl.statusQueryParam">
									<option value="0">--请选择状态--</option>
									<option value="3">已签退</option>
									<option value="4">未签退</option>
								</select>
							</div>
							<a href="javascript:;" ng-click="ctrl.query()" type="submit" class="btn checkBtn">查询</a>
						</div>
						<table class="newTABLE">
							<thead>
							<th style="width: 3%" class="selBOX"><input ng-change="changeAll()" ng-model="selectAll" type="checkbox"></th>
							<th style="width: 20%">姓名</th>
							<th style="width: 20%">签到状态</th>
							<th style="width: 20%">签退状态</th>
							<th style="width: 20%">考勤状态</th>
							<th style="width: 20%">操作</th>
							</thead>
							<tr ng-repeat="item in ctrl.entities.content" ng-init="outerIndex=$index" ng-click="changeCurrents(item, $event)">
								<td class="selBOX"><input ng-model="item.checked" ng-click="changeCurrent(item, $event)" type="checkbox"></td>
								<td>{{item.xm}}【{{item.xhgh}}】</td>
								<td>{{item.qiandao == 1 ? '已签到' : '未签到'}}</td>
								<td>{{item.qiantui == 1 ? '已签退' : '未签退'}}</td>
								<td>
									<div ng-if="item.dkbz == 1">正常</div>
									<div ng-if="item.dkbz == 2">请假</div>
									<div ng-if="item.dkbz == 3">缺勤</div>
								</td>
								<td>
									<a href="javascript:;" class="btn_w release" ng-click="ctrl.qiantui(item)" ng-if="item.qiantui!='1'">确认签退</a>
								</td>
							</tr>
						</table>
						<div class="panel-body">
							共有记录：
							<span>{{ctrl.entities.totalElements}}</span>
							条
							<div class="pull-right" ng-include="':root/components/page.html'"></div>
						</div>
					</div>
	            </div>
			</div>
	   	</div>
	</div>
	<div id="footer_wrap"></div>
   
	<!-- js -->
	<script src="asset/outdatedbrowser/outdatedbrowser.js"></script>
    <script type="text/javascript" data-main="asset/main.js" src="asset/js/require.min.js"></script>
    <script type="text/javascript" src="asset/jquery/jquery.js"></script>
    <script type="text/javascript" src="asset/js/comm.js"></script>
    <script type="text/javascript" src="asset/js/banner.js"></script>
    <script type="text/javascript" src="asset/js/include.js"></script>

    <script>
        function DkggCtrl($injector,$scope, CtrlUtil, $element, $http,$state,$location) {
            var back = false;
            var ctrl = this;
            ctrl.statusQueryParam = "0";
            ctrl.dakacenterKeName = localStorage.getItem("dakacenterKeName");
            ctrl.kcIdQueryParam = localStorage.getItem("dakacenterKeId");

            console.info(localStorage.getItem("dakacenterKeId") + "" + localStorage.getItem("dakacenterKeName"))

            var listUrl = ':root/kqc/listYbm';
            this.query = function () {
                ctrl.entities && (ctrl.entities.content = {})
                var p = CtrlUtil.getQueryParams(ctrl)
                $http.post(listUrl, p).success(function (r) {
                    ctrl.entities = r;
                })
            }

            this.qiantui = function (item) {
                var qiandaoUrl = ':root/kqc/addKqByType';
                $http.post(qiandaoUrl, {
                    type:'2',
                    xhgh:item.xhgh,
					xm:item.xm,
					kc:item.kc,
                    kqId:item.id
				}).success(function (r) {
                    ctrl.query()
                })
            }
        }
	</script>
</body>
</html>